//@author A0088498A
package common;

/**
 * The defined type of Task supported <br/>
 * 
 */

public enum TaskType {
	timed, floating, deadline, invalid;
	
	/**
	 * Convert the String into the TaskType
	 * 
	 * @param string
	 *            to be converted
	 * @return the TaskType converted. Return invalid if the string is null
	 *         or cannot be converted
	 */
	public static TaskType getValueOf(String string) {
		try {
			return valueOf(string);
		} catch (RuntimeException e) {
			return invalid;
		}
	}
}
